let domain = 'http://exec8.test';
export function request(path, param, method='GET'){
	// 一系列的操作
  let url = domain + path
  let token = uni.getStorageSync('token')
	return new Promise((resolve, reject) => {
		uni.request({
			url: url,
			method: method,
			dataType: 'json',
			data: param,
			header:{
        token: token
			},
			success: (res) => {
        // 集中处理一些通用错误
        resolve(res)
			},
			fail: (err) => {
				reject(err)
			}
		})
	})
}